www.gusucode.com > 帝国网站管理系统(帝国CMS) 6 > 帝国网站管理系统(帝国CMS) 6.5繁体UTF-8/upload/e/admin/ecmseditor/fileinc/editorpic.php
<?php if(!defined('InEmpireCMS')) { exit(); } $i=0; $line=3;//每行顯示圖片數 $width=100; $height=80; $sub=23;//編號截取數 while($r=$empire->fetch($sql)) { $ono=$r[no]; $r[no]=sub($r[no],0,$sub,false); $filesize=ChTheFilesize($r[filesize]);//文件大小 $filetype=GetFiletype($r[filename]);//取得文件擴展名 $i++; if(($i-1)%$line==0||$i==1) { $class_text.="<tr bgcolor='#DBEAF5'>"; } //文件 $fspath=ReturnFileSavePath($r[classid],$r[fpath]); $filepath=$r[path]?$r[path].'/':$r[path]; $file=$fspath['fileurl'].$filepath.$r[filename]; $button=ToReturnDoFileButton($doing,$tranfrom,$field,$file,$r[filename],$r[fileid],$filesize,$filetype,$ono,$type); $class_text.="<td><table width='100%' border='0' cellspacing='1' cellpadding='2'> <tr> <td><div align='center'><a href='../../ViewImg/index.html?url=".$file."' target='_blank' title='預覽:".$r[filename]."'><img src='".$file."' width='".$width."' height='".$height."' border=0></a></div></td> </tr> <tr> <td><div align='center'><a title='".$ono."'>".$r[no]."</a></div></td> </tr> <tr> <td><div align='center'><input type=checkbox name=fileid[] value='$r[fileid]'> ".$button."</div></td> </tr> </table></td>"; //分割 if($i%$line==0) { $class_text.="</tr>"; } } if($i<>0) { $table="<table width='100%' border=0 cellpadding=3 cellspacing=1 class='tableborder'> <tr class='header'> <td>圖片</td> </tr> <tr> <td bgcolor='#FFFFFF'><table width='100%' border=1 align=center cellpadding=2 cellspacing=1 bordercolor='#FFFFFF' bgcolor='#FFFFFF'>"; $table1="</table></td> </tr> <tr> <td bgcolor='#FFFFFF'> ".$returnpage." </td> </tr></table>"; $ys=$line-$i%$line; $p=0; for($j=0;$j<$ys&&$ys!=$line;$j++) { $p=1; $class_text.="<td> </td>"; } if($p==1) { $class_text.="</tr>"; } } $text=$table.$class_text.$table1; echo"$text"; ?> <table width="100%" border="0" cellspacing="1" cellpadding="3"> <tr> <td height="25"> <input name="getmark" type="checkbox" id="getmark" value="1"> <a href="../SetEnews.php" target="_blank">加水印</a>, <input name="getsmall" type="checkbox" id="getsmall" value="1"> 生成縮略圖:縮圖寬度: <input name="width" type="text" id="width" value="105" size="6"> * 高度: <input name="height" type="text" id="height" value="118" size="6"> <input type="submit" name="Submit" value="操作選中圖片"> <input type="submit" name="Submit3" value="刪除選中" onclick="document.dofile.enews.value='TDelFile_all';"><input type="checkbox" name="chkall" value="on" onclick="CheckAll(this.form)">全選 </td> </tr> </table>